Homework 5
- Your homework solution has to be handed in as a group solution via Moodle.
- Clearly state name and matriculation number of each student
1 Galilean invariance
Galilean invariance states that the laws of motion (conservation of momentum) remain the same in all inertial frames of reference. Mathematically, this principle means that the laws of motion are invariant w.r.t a Galilean transformation, which has the following form in the one-dimensional case
\[ \zeta = x - v t \; , v = \textrm{constant} \]
and is connected with the transition from a staionary co-ordinate system \((x, t)\) to an inertial co-ordinate system \((\zeta, t)\) that moves with a constant velocity \(v\) relative to the absolute system.
The shallow water equations (SWE) with velocity profile correction in one space dimension are given by
\[ \dfrac{\partial}{\partial t} \begin{pmatrix} h \\ hu \end{pmatrix} + \dfrac{\partial}{\partial x} \begin{pmatrix} hu \\ \alpha h u^{2} + \frac{gh^2}{2} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \]
where \(h(x,t)\) describes fluid depth, \(u(x,t)\) is the mean flow velocity and \(g=9.81 \textrm{m}/\textrm{s}^2\) is the gravitational acceleration.
1.1 Tasks
Task 1
Show that the SWE with velocity profile correction are not Galilean invariant.
Task 2
If we assume plug-flow \((\alpha=1)\), show that the SWE are Galilean invariant.
2 Shallow water equations with shape factor
The shallow water equations with velocity profile correction in one space dimension are given by: \[ \frac{\partial}{\partial t} \begin{pmatrix} h \\ h u \end{pmatrix} + \frac{\partial}{\partial x} \begin{pmatrix} h u \\ \alpha h u^2 + g \frac{h^2}{2} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \]
where \(h(x,t)\) describes the fluid depth, \(u(x,t)\) the mean flow velocity and \(g=9.81 \textrm{m}/\textrm{s}^2\) is the gravitational acceleration.
2.1 Tasks
Task 1
What does \(\alpha\) stand for and how can it be computed? Determine \(\alpha\) for a linear velocity profile with \(u(y=0) = 0\) and \(u(y=h) = u_s\).
Task 2
Assume a shallow lake, currently at rest. That means \(h=H\) and \(u=0\). A stone is thrown into the lake and causes a small surface perturbation in height and velocity, denoted by \(h_1\) and \(u_1\). Derive a of equations for \(h_1\) and \(u_1\) by means of linearization
The linearization can be performed by looking at small perturbations from a ground state \((h_0, u_0)\), e.g. by defining: \(h(x,t) = h_0(x, t) + \delta \, h_1(x,t) + \mathcal{O}( \delta^2 )\) and \(u(x,t) = u_0(x, t) + \delta \, u_1(x,t) + \mathcal{O}( \delta^2 )\), where \(\delta\) denotes the small amplitude of the perturbation.
Task 3
Reduce the system derived in Task 2 to an equation for \(h_1\). What type of equation do we find?
Task 4
The wave ansatz is given by \(h_1(x,t) = A \, e^{i (k \, x - \omega \, t)}\). State what \(A\), \(i\), \(k\) and \(\omega\) stand for? Using the wave ansatz, compute the phase velocity.
Task 5
Assume that we wait \(10s\) until a surface perturbation caused by a stone reaches the lake’s shore. How much longer would we have to wait at a similarly sized lake on Saturn’s moon Titan? (Titan has surface lakes of liquid ethane and methane and a gravitational acceleration of \(g=1.4 \frac{m}{s^2}\))
3 Where is the test function?
Consider a general scalar conservation law in 1D:
\[ \partial_t q + \partial_x f(q) = 0 \tag{1}\]
We alreay derived the weak-integral formulation of Equation 1 in the lecture about the FVM for the shallow water equation. However, one may rise the question: Where is the test function in this weak formulation?
We want to address this question in the following.
3.1 Tasks
Task 1
Derive the weak formulation of Equation 1 using the following strategy
- We define a indicator function (test function)
\[ \phi(x, t) = \begin{cases} 1 & \text{ for } (x, t) \in [x_{i-1/2}, x_{i+1/2}] \times [t_n, t_{n+1}] \\ 0 & \text{ else } \end{cases} \]
Multiply Equation 1 by the test function and integrate over the space-time volume \([x_{i-1/2}, x_{i+1/2}] \times [t_n, t_{n+1}]\).
We now want to extend the integration bounds to \((-\inf, \inf) \times [0, \inf)\). Why can we do that?
We want to use the fact that we can approximate \(\phi\) with another test function that is continously-differentiable with arbitrary accuracy. Let’s call this new test function \(\tilde{\phi}\). Use partial integration to derive at the weak formulation of Equation 1. Simplify the expression as much as possible.
Task 2
The statement derived in 4. indicates that the weak-formulation also makes sense in the presence of discontinuities. Why?
4 Roe’s method
In the derivation of the Roe’s method, we derived at the following definition of Roe’s flux:
\[ \mathbf{f}_{i+1/2}^{Roe} = \frac{1}{2} \left( \mathbf{f}_l + \mathbf{f}_r \right) + \bar{\mathbf{A}}(\tilde{\mathbf{Q}}) \bar{\mathbf{Q}}^{l.R.P.}_{i+1/2} - \frac{1}{2} \bar{\mathbf{A}}(\tilde{\mathbf{Q}}) \cdot \left( \mathbf{Q}_R - \mathbf{Q}_L \right) \tag{2}\]
where \(\tilde{\mathbf{Q}}\) was the yet undefined state around which we linearize \(\mathbf{A}\) and \(\bar{\mathbf{Q}}_{i+1/2}^{l.R.P.}\) is the solution of the linearized Riemann problem at the interface for \(t>0\).
4.1 Tasks
Task 1
Show that Equation 2 is equivalent to Equation 3:
\[ \mathbf{f}_{i+1/2}^{Roe} = \frac{1}{2} \left( \mathbf{f}_l + \mathbf{f}_r \right) - \frac{1}{2} \Big| \bar{\mathbf{A}}(\tilde{\mathbf{Q}}) \Big| \cdot \left( \mathbf{Q}_R - \mathbf{Q}_L \right) \tag{3}\]
where \(\big| \mathbf{A} \big| = \mathbf{R} \Big| \mathbf{\Lambda} \Big| \mathbf{R}^{-1}\) for a given eigen-decomposition \(\mathbf{A} = \mathbf{R} \mathbf{\Lambda} \mathbf{R}^{-1}\).
5 Path-conservative finite volume method
See the shallow_water_equations.ipynb
notebook on our RWTHJupyterhub.
In case you want to work on your local system, you can download the notebook (and the correpsonding folder swe
from there). The only python dependencies of this notebook are numpy
and matplotlib
.